package cn.mw.cmdb.entity;

import cn.mw.components.mongodb.anno.AutoId;
import cn.mw.components.mongodb.anno.CMDBProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

@Data
@Document("mw_macros_name_mapper")
public class MacrosInfo {
    @Schema(description = "MacroId")
    @CMDBProperty(searchType = PropertyTypeString.ID, searchPrefix = "_", isShow = true)
    @AutoId
    private String id;
    @Indexed
    @Schema(description = "监控宏值")
    @CMDBProperty(searchType = PropertyTypeString.ID, keywordSearch = true)
    private String macro;
    @Indexed
    @Schema(description = "监控宏值备份")
    @CMDBProperty(searchType = PropertyTypeString.ID, keywordSearch = true)
    private String macroBak;
    @Indexed
    @Schema(description = "宏值名称")
    @CMDBProperty(searchType = PropertyTypeString.ID, keywordSearch = true)
    private String chMacro;
    @Indexed
    @Schema(description = "描述")
    @CMDBProperty(searchType = PropertyTypeString.ID, keywordSearch = true)
    private String descr;
    @Indexed
    @Schema(description = "实例名称")
    @CMDBProperty(searchType = PropertyTypeInt.ID)
    private Integer macroEncryption;
}
